home *** CD-ROM | disk | FTP | other *** search
/ Aminet 52 / Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso / Aminet / dev / gg / gengetopt-2.6.lha / gengetopt-2.6 / configure < prev    next >
Text File  |  2001-12-31  |  83KB  |  2,806 lines

  1. #! /bin/sh
  2.  
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 2.13 
  5. # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
  6. #
  7. # This configure script is free software; the Free Software Foundation
  8. # gives unlimited permission to copy, distribute and modify it.
  9.  
  10. # Defaults:
  11. ac_help=
  12. ac_default_prefix=/usr/local
  13. # Any additions from configure.in:
  14. ac_help="$ac_help
  15.   --enable-warnings       enable compiler warnings"
  16.  
  17. # Initialize some variables set by options.
  18. # The variables have the same names as the options, with
  19. # dashes changed to underlines.
  20. build=NONE
  21. cache_file=./config.cache
  22. exec_prefix=NONE
  23. host=NONE
  24. no_create=
  25. nonopt=NONE
  26. no_recursion=
  27. prefix=NONE
  28. program_prefix=NONE
  29. program_suffix=NONE
  30. program_transform_name=s,x,x,
  31. silent=
  32. site=
  33. srcdir=
  34. target=NONE
  35. verbose=
  36. x_includes=NONE
  37. x_libraries=NONE
  38. bindir='${exec_prefix}/bin'
  39. sbindir='${exec_prefix}/sbin'
  40. libexecdir='${exec_prefix}/libexec'
  41. datadir='${prefix}/share'
  42. sysconfdir='${prefix}/etc'
  43. sharedstatedir='${prefix}/com'
  44. localstatedir='${prefix}/var'
  45. libdir='${exec_prefix}/lib'
  46. includedir='${prefix}/include'
  47. oldincludedir='/usr/include'
  48. infodir='${prefix}/info'
  49. mandir='${prefix}/man'
  50.  
  51. # Initialize some other variables.
  52. subdirs=
  53. MFLAGS= MAKEFLAGS=
  54. SHELL=${CONFIG_SHELL-/bin/sh}
  55. # Maximum number of lines to put in a shell here document.
  56. ac_max_here_lines=12
  57.  
  58. ac_prev=
  59. for ac_option
  60. do
  61.  
  62.   # If the previous option needs an argument, assign it.
  63.   if test -n "$ac_prev"; then
  64.     eval "$ac_prev=\$ac_option"
  65.     ac_prev=
  66.     continue
  67.   fi
  68.  
  69.   case "$ac_option" in
  70.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  71.   *) ac_optarg= ;;
  72.   esac
  73.  
  74.   # Accept the important Cygnus configure options, so we can diagnose typos.
  75.  
  76.   case "$ac_option" in
  77.  
  78.   -bindir | --bindir | --bindi | --bind | --bin | --bi)
  79.     ac_prev=bindir ;;
  80.   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  81.     bindir="$ac_optarg" ;;
  82.  
  83.   -build | --build | --buil | --bui | --bu)
  84.     ac_prev=build ;;
  85.   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  86.     build="$ac_optarg" ;;
  87.  
  88.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  89.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  90.     ac_prev=cache_file ;;
  91.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  92.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  93.     cache_file="$ac_optarg" ;;
  94.  
  95.   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  96.     ac_prev=datadir ;;
  97.   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  98.   | --da=*)
  99.     datadir="$ac_optarg" ;;
  100.  
  101.   -disable-* | --disable-*)
  102.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  103.     # Reject names that are not valid shell variable names.
  104.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  105.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  106.     fi
  107.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  108.     eval "enable_${ac_feature}=no" ;;
  109.  
  110.   -enable-* | --enable-*)
  111.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  112.     # Reject names that are not valid shell variable names.
  113.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  114.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  115.     fi
  116.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  117.     case "$ac_option" in
  118.       *=*) ;;
  119.       *) ac_optarg=yes ;;
  120.     esac
  121.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  122.  
  123.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  124.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  125.   | --exec | --exe | --ex)
  126.     ac_prev=exec_prefix ;;
  127.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  128.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  129.   | --exec=* | --exe=* | --ex=*)
  130.     exec_prefix="$ac_optarg" ;;
  131.  
  132.   -gas | --gas | --ga | --g)
  133.     # Obsolete; use --with-gas.
  134.     with_gas=yes ;;
  135.  
  136.   -help | --help | --hel | --he)
  137.     # Omit some internal or obsolete options to make the list less imposing.
  138.     # This message is too long to be a string in the A/UX 3.1 sh.
  139.     cat << EOF
  140. Usage: configure [options] [host]
  141. Options: [defaults in brackets after descriptions]
  142. Configuration:
  143.   --cache-file=FILE       cache test results in FILE
  144.   --help                  print this message
  145.   --no-create             do not create output files
  146.   --quiet, --silent       do not print \`checking...' messages
  147.   --version               print the version of autoconf that created configure
  148. Directory and file names:
  149.   --prefix=PREFIX         install architecture-independent files in PREFIX
  150.                           [$ac_default_prefix]
  151.   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  152.                           [same as prefix]
  153.   --bindir=DIR            user executables in DIR [EPREFIX/bin]
  154.   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  155.   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  156.   --datadir=DIR           read-only architecture-independent data in DIR
  157.                           [PREFIX/share]
  158.   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  159.   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  160.                           [PREFIX/com]
  161.   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  162.   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  163.   --includedir=DIR        C header files in DIR [PREFIX/include]
  164.   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  165.   --infodir=DIR           info documentation in DIR [PREFIX/info]
  166.   --mandir=DIR            man documentation in DIR [PREFIX/man]
  167.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  168.   --program-prefix=PREFIX prepend PREFIX to installed program names
  169.   --program-suffix=SUFFIX append SUFFIX to installed program names
  170.   --program-transform-name=PROGRAM
  171.                           run sed PROGRAM on installed program names
  172. EOF
  173.     cat << EOF
  174. Host type:
  175.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  176.   --host=HOST             configure for HOST [guessed]
  177.   --target=TARGET         configure for TARGET [TARGET=HOST]
  178. Features and packages:
  179.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  180.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  181.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  182.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  183.   --x-includes=DIR        X include files are in DIR
  184.   --x-libraries=DIR       X library files are in DIR
  185. EOF
  186.     if test -n "$ac_help"; then
  187.       echo "--enable and --with options recognized:$ac_help"
  188.     fi
  189.     exit 0 ;;
  190.  
  191.   -host | --host | --hos | --ho)
  192.     ac_prev=host ;;
  193.   -host=* | --host=* | --hos=* | --ho=*)
  194.     host="$ac_optarg" ;;
  195.  
  196.   -includedir | --includedir | --includedi | --included | --include \
  197.   | --includ | --inclu | --incl | --inc)
  198.     ac_prev=includedir ;;
  199.   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  200.   | --includ=* | --inclu=* | --incl=* | --inc=*)
  201.     includedir="$ac_optarg" ;;
  202.  
  203.   -infodir | --infodir | --infodi | --infod | --info | --inf)
  204.     ac_prev=infodir ;;
  205.   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  206.     infodir="$ac_optarg" ;;
  207.  
  208.   -libdir | --libdir | --libdi | --libd)
  209.     ac_prev=libdir ;;
  210.   -libdir=* | --libdir=* | --libdi=* | --libd=*)
  211.     libdir="$ac_optarg" ;;
  212.  
  213.   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  214.   | --libexe | --libex | --libe)
  215.     ac_prev=libexecdir ;;
  216.   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  217.   | --libexe=* | --libex=* | --libe=*)
  218.     libexecdir="$ac_optarg" ;;
  219.  
  220.   -localstatedir | --localstatedir | --localstatedi | --localstated \
  221.   | --localstate | --localstat | --localsta | --localst \
  222.   | --locals | --local | --loca | --loc | --lo)
  223.     ac_prev=localstatedir ;;
  224.   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  225.   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  226.   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  227.     localstatedir="$ac_optarg" ;;
  228.  
  229.   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  230.     ac_prev=mandir ;;
  231.   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  232.     mandir="$ac_optarg" ;;
  233.  
  234.   -nfp | --nfp | --nf)
  235.     # Obsolete; use --without-fp.
  236.     with_fp=no ;;
  237.  
  238.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  239.   | --no-cr | --no-c)
  240.     no_create=yes ;;
  241.  
  242.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  243.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  244.     no_recursion=yes ;;
  245.  
  246.   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  247.   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  248.   | --oldin | --oldi | --old | --ol | --o)
  249.     ac_prev=oldincludedir ;;
  250.   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  251.   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  252.   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  253.     oldincludedir="$ac_optarg" ;;
  254.  
  255.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  256.     ac_prev=prefix ;;
  257.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  258.     prefix="$ac_optarg" ;;
  259.  
  260.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  261.   | --program-pre | --program-pr | --program-p)
  262.     ac_prev=program_prefix ;;
  263.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  264.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  265.     program_prefix="$ac_optarg" ;;
  266.  
  267.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  268.   | --program-suf | --program-su | --program-s)
  269.     ac_prev=program_suffix ;;
  270.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  271.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  272.     program_suffix="$ac_optarg" ;;
  273.  
  274.   -program-transform-name | --program-transform-name \
  275.   | --program-transform-nam | --program-transform-na \
  276.   | --program-transform-n | --program-transform- \
  277.   | --program-transform | --program-transfor \
  278.   | --program-transfo | --program-transf \
  279.   | --program-trans | --program-tran \
  280.   | --progr-tra | --program-tr | --program-t)
  281.     ac_prev=program_transform_name ;;
  282.   -program-transform-name=* | --program-transform-name=* \
  283.   | --program-transform-nam=* | --program-transform-na=* \
  284.   | --program-transform-n=* | --program-transform-=* \
  285.   | --program-transform=* | --program-transfor=* \
  286.   | --program-transfo=* | --program-transf=* \
  287.   | --program-trans=* | --program-tran=* \
  288.   | --progr-tra=* | --program-tr=* | --program-t=*)
  289.     program_transform_name="$ac_optarg" ;;
  290.  
  291.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  292.   | -silent | --silent | --silen | --sile | --sil)
  293.     silent=yes ;;
  294.  
  295.   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  296.     ac_prev=sbindir ;;
  297.   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  298.   | --sbi=* | --sb=*)
  299.     sbindir="$ac_optarg" ;;
  300.  
  301.   -sharedstatedir | --sharedstatedir | --sharedstatedi \
  302.   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  303.   | --sharedst | --shareds | --shared | --share | --shar \
  304.   | --sha | --sh)
  305.     ac_prev=sharedstatedir ;;
  306.   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  307.   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  308.   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  309.   | --sha=* | --sh=*)
  310.     sharedstatedir="$ac_optarg" ;;
  311.  
  312.   -site | --site | --sit)
  313.     ac_prev=site ;;
  314.   -site=* | --site=* | --sit=*)
  315.     site="$ac_optarg" ;;
  316.  
  317.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  318.     ac_prev=srcdir ;;
  319.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  320.     srcdir="$ac_optarg" ;;
  321.  
  322.   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  323.   | --syscon | --sysco | --sysc | --sys | --sy)
  324.     ac_prev=sysconfdir ;;
  325.   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  326.   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  327.     sysconfdir="$ac_optarg" ;;
  328.  
  329.   -target | --target | --targe | --targ | --tar | --ta | --t)
  330.     ac_prev=target ;;
  331.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  332.     target="$ac_optarg" ;;
  333.  
  334.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  335.     verbose=yes ;;
  336.  
  337.   -version | --version | --versio | --versi | --vers)
  338.     echo "configure generated by autoconf version 2.13"
  339.     exit 0 ;;
  340.  
  341.   -with-* | --with-*)
  342.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  343.     # Reject names that are not valid shell variable names.
  344.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  345.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  346.     fi
  347.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  348.     case "$ac_option" in
  349.       *=*) ;;
  350.       *) ac_optarg=yes ;;
  351.     esac
  352.     eval "with_${ac_package}='$ac_optarg'" ;;
  353.  
  354.   -without-* | --without-*)
  355.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  356.     # Reject names that are not valid shell variable names.
  357.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  358.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  359.     fi
  360.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  361.     eval "with_${ac_package}=no" ;;
  362.  
  363.   --x)
  364.     # Obsolete; use --with-x.
  365.     with_x=yes ;;
  366.  
  367.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  368.   | --x-incl | --x-inc | --x-in | --x-i)
  369.     ac_prev=x_includes ;;
  370.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  371.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  372.     x_includes="$ac_optarg" ;;
  373.  
  374.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  375.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  376.     ac_prev=x_libraries ;;
  377.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  378.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  379.     x_libraries="$ac_optarg" ;;
  380.  
  381.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  382.     ;;
  383.  
  384.   *)
  385.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  386.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  387.     fi
  388.     if test "x$nonopt" != xNONE; then
  389.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  390.     fi
  391.     nonopt="$ac_option"
  392.     ;;
  393.  
  394.   esac
  395. done
  396.  
  397. if test -n "$ac_prev"; then
  398.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  399. fi
  400.  
  401. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  402.  
  403. # File descriptor usage:
  404. # 0 standard input
  405. # 1 file creation
  406. # 2 errors and warnings
  407. # 3 some systems may open it to /dev/tty
  408. # 4 used on the Kubota Titan
  409. # 6 checking for... messages and results
  410. # 5 compiler messages saved in config.log
  411. if test "$silent" = yes; then
  412.   exec 6>/dev/null
  413. else
  414.   exec 6>&1
  415. fi
  416. exec 5>./config.log
  417.  
  418. echo "\
  419. This file contains any messages produced by compilers while
  420. running configure, to aid debugging if configure makes a mistake.
  421. " 1>&5
  422.  
  423. # Strip out --no-create and --no-recursion so they do not pile up.
  424. # Also quote any args containing shell metacharacters.
  425. ac_configure_args=
  426. for ac_arg
  427. do
  428.   case "$ac_arg" in
  429.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  430.   | --no-cr | --no-c) ;;
  431.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  432.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  433.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  434.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  435.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  436.   esac
  437. done
  438.  
  439. # NLS nuisances.
  440. # Only set these to C if already set.  These must not be set unconditionally
  441. # because not all systems understand e.g. LANG=C (notably SCO).
  442. # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
  443. # Non-C LC_CTYPE values break the ctype check.
  444. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  445. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  446. if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
  447. if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
  448.  
  449. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  450. rm -rf conftest* confdefs.h
  451. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  452. echo > confdefs.h
  453.  
  454. # A filename unique to this package, relative to the directory that
  455. # configure is in, which we can look for to find out if srcdir is correct.
  456. ac_unique_file=reconf
  457.  
  458. # Find the source files, if location was not specified.
  459. if test -z "$srcdir"; then
  460.   ac_srcdir_defaulted=yes
  461.   # Try the directory containing this script, then its parent.
  462.   ac_prog=$0
  463.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  464.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  465.   srcdir=$ac_confdir
  466.   if test ! -r $srcdir/$ac_unique_file; then
  467.     srcdir=..
  468.   fi
  469. else
  470.   ac_srcdir_defaulted=no
  471. fi
  472. if test ! -r $srcdir/$ac_unique_file; then
  473.   if test "$ac_srcdir_defaulted" = yes; then
  474.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  475.   else
  476.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  477.   fi
  478. fi
  479. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  480.  
  481. # Prefer explicitly selected file to automatically selected ones.
  482. if test -z "$CONFIG_SITE"; then
  483.   if test "x$prefix" != xNONE; then
  484.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  485.   else
  486.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  487.   fi
  488. fi
  489. for ac_site_file in $CONFIG_SITE; do
  490.   if test -r "$ac_site_file"; then
  491.     echo "loading site script $ac_site_file"
  492.     . "$ac_site_file"
  493.   fi
  494. done
  495.  
  496. if test -r "$cache_file"; then
  497.   echo "loading cache $cache_file"
  498.   . $cache_file
  499. else
  500.   echo "creating cache $cache_file"
  501.   > $cache_file
  502. fi
  503.  
  504. ac_ext=c
  505. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  506. ac_cpp='$CPP $CPPFLAGS'
  507. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  508. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  509. cross_compiling=$ac_cv_prog_cc_cross
  510.  
  511. ac_exeext=
  512. ac_objext=o
  513. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  514.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  515.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  516.     ac_n= ac_c='
  517. ' ac_t='    '
  518.   else
  519.     ac_n=-n ac_c= ac_t=
  520.   fi
  521. else
  522.   ac_n= ac_c='\c' ac_t=
  523. fi
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531. ac_aux_dir=
  532. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  533.   if test -f $ac_dir/install-sh; then
  534.     ac_aux_dir=$ac_dir
  535.     ac_install_sh="$ac_aux_dir/install-sh -c"
  536.     break
  537.   elif test -f $ac_dir/install.sh; then
  538.     ac_aux_dir=$ac_dir
  539.     ac_install_sh="$ac_aux_dir/install.sh -c"
  540.     break
  541.   fi
  542. done
  543. if test -z "$ac_aux_dir"; then
  544.   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  545. fi
  546. ac_config_guess=$ac_aux_dir/config.guess
  547. ac_config_sub=$ac_aux_dir/config.sub
  548. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  549.  
  550. # Find a good install program.  We prefer a C program (faster),
  551. # so one script is as good as another.  But avoid the broken or
  552. # incompatible versions:
  553. # SysV /etc/install, /usr/sbin/install
  554. # SunOS /usr/etc/install
  555. # IRIX /sbin/install
  556. # AIX /bin/install
  557. # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
  558. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  559. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  560. # ./install, which can be erroneously created by make from ./install.sh.
  561. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  562. echo "configure:563: checking for a BSD compatible install" >&5
  563. if test -z "$INSTALL"; then
  564. if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  565.   echo $ac_n "(cached) $ac_c" 1>&6
  566. else
  567.     IFS="${IFS=     }"; ac_save_IFS="$IFS"; IFS=":"
  568.   for ac_dir in $PATH; do
  569.     # Account for people who put trailing slashes in PATH elements.
  570.     case "$ac_dir/" in
  571.     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  572.     *)
  573.       # OSF1 and SCO ODT 3.0 have their own names for install.
  574.       # Don't use installbsd from OSF since it installs stuff as root
  575.       # by default.
  576.       for ac_prog in ginstall scoinst install; do
  577.         if test -f $ac_dir/$ac_prog; then
  578.       if test $ac_prog = install &&
  579.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  580.         # AIX install.  It has an incompatible calling convention.
  581.         :
  582.       else
  583.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  584.         break 2
  585.       fi
  586.     fi
  587.       done
  588.       ;;
  589.     esac
  590.   done
  591.   IFS="$ac_save_IFS"
  592.  
  593. fi
  594.   if test "${ac_cv_path_install+set}" = set; then
  595.     INSTALL="$ac_cv_path_install"
  596.   else
  597.     # As a last resort, use the slow shell script.  We don't cache a
  598.     # path for INSTALL within a source directory, because that will
  599.     # break other packages using the cache if that directory is
  600.     # removed, or if the path is relative.
  601.     INSTALL="$ac_install_sh"
  602.   fi
  603. fi
  604. echo "$ac_t""$INSTALL" 1>&6
  605.  
  606. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  607. # It thinks the first close brace ends the variable substitution.
  608. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  609.  
  610. test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
  611.  
  612. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  613.  
  614. echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
  615. echo "configure:616: checking whether build environment is sane" >&5
  616. # Just in case
  617. sleep 1
  618. echo timestamp > conftestfile
  619. # Do `set' in a subshell so we don't clobber the current shell's
  620. # arguments.  Must try -L first in case configure is actually a
  621. # symlink; some systems play weird games with the mod time of symlinks
  622. # (eg FreeBSD returns the mod time of the symlink's containing
  623. # directory).
  624. if (
  625.    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
  626.    if test "$*" = "X"; then
  627.       # -L didn't work.
  628.       set X `ls -t $srcdir/configure conftestfile`
  629.    fi
  630.    if test "$*" != "X $srcdir/configure conftestfile" \
  631.       && test "$*" != "X conftestfile $srcdir/configure"; then
  632.  
  633.       # If neither matched, then we have a broken ls.  This can happen
  634.       # if, for instance, CONFIG_SHELL is bash and it inherits a
  635.       # broken ls alias from the environment.  This has actually
  636.       # happened.  Such a system could not be considered "sane".
  637.       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
  638. alias in your environment" 1>&2; exit 1; }
  639.    fi
  640.  
  641.    test "$2" = conftestfile
  642.    )
  643. then
  644.    # Ok.
  645.    :
  646. else
  647.    { echo "configure: error: newly created file is older than distributed files!
  648. Check your system clock" 1>&2; exit 1; }
  649. fi
  650. rm -f conftest*
  651. echo "$ac_t""yes" 1>&6
  652. if test "$program_transform_name" = s,x,x,; then
  653.   program_transform_name=
  654. else
  655.   # Double any \ or $.  echo might interpret backslashes.
  656.   cat <<\EOF_SED > conftestsed
  657. s,\\,\\\\,g; s,\$,$$,g
  658. EOF_SED
  659.   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
  660.   rm -f conftestsed
  661. fi
  662. test "$program_prefix" != NONE &&
  663.   program_transform_name="s,^,${program_prefix},; $program_transform_name"
  664. # Use a double $ so make ignores it.
  665. test "$program_suffix" != NONE &&
  666.   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
  667.  
  668. # sed with no file args requires a program.
  669. test "$program_transform_name" = "" && program_transform_name="s,x,x,"
  670.  
  671. echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
  672. echo "configure:673: checking whether ${MAKE-make} sets \${MAKE}" >&5
  673. set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
  674. if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  675.   echo $ac_n "(cached) $ac_c" 1>&6
  676. else
  677.   cat > conftestmake <<\EOF
  678. all:
  679.     @echo 'ac_maketemp="${MAKE}"'
  680. EOF
  681. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  682. eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
  683. if test -n "$ac_maketemp"; then
  684.   eval ac_cv_prog_make_${ac_make}_set=yes
  685. else
  686.   eval ac_cv_prog_make_${ac_make}_set=no
  687. fi
  688. rm -f conftestmake
  689. fi
  690. if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  691.   echo "$ac_t""yes" 1>&6
  692.   SET_MAKE=
  693. else
  694.   echo "$ac_t""no" 1>&6
  695.   SET_MAKE="MAKE=${MAKE-make}"
  696. fi
  697.  
  698.  
  699. PACKAGE=gengetopt
  700.  
  701. VERSION=2.6
  702.  
  703. if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
  704.   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
  705. fi
  706. cat >> confdefs.h <<EOF
  707. #define PACKAGE "$PACKAGE"
  708. EOF
  709.  
  710. cat >> confdefs.h <<EOF
  711. #define VERSION "$VERSION"
  712. EOF
  713.  
  714.  
  715.  
  716. missing_dir=`cd $ac_aux_dir && pwd`
  717. echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
  718. echo "configure:719: checking for working aclocal" >&5
  719. # Run test in a subshell; some versions of sh will print an error if
  720. # an executable is not found, even if stderr is redirected.
  721. # Redirect stdin to placate older versions of autoconf.  Sigh.
  722. if (aclocal --version) < /dev/null > /dev/null 2>&1; then
  723.    ACLOCAL=aclocal
  724.    echo "$ac_t""found" 1>&6
  725. else
  726.    ACLOCAL="$missing_dir/missing aclocal"
  727.    echo "$ac_t""missing" 1>&6
  728. fi
  729.  
  730. echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
  731. echo "configure:732: checking for working autoconf" >&5
  732. # Run test in a subshell; some versions of sh will print an error if
  733. # an executable is not found, even if stderr is redirected.
  734. # Redirect stdin to placate older versions of autoconf.  Sigh.
  735. if (autoconf --version) < /dev/null > /dev/null 2>&1; then
  736.    AUTOCONF=autoconf
  737.    echo "$ac_t""found" 1>&6
  738. else
  739.    AUTOCONF="$missing_dir/missing autoconf"
  740.    echo "$ac_t""missing" 1>&6
  741. fi
  742.  
  743. echo $ac_n "checking for working automake""... $ac_c" 1>&6
  744. echo "configure:745: checking for working automake" >&5
  745. # Run test in a subshell; some versions of sh will print an error if
  746. # an executable is not found, even if stderr is redirected.
  747. # Redirect stdin to placate older versions of autoconf.  Sigh.
  748. if (automake --version) < /dev/null > /dev/null 2>&1; then
  749.    AUTOMAKE=automake
  750.    echo "$ac_t""found" 1>&6
  751. else
  752.    AUTOMAKE="$missing_dir/missing automake"
  753.    echo "$ac_t""missing" 1>&6
  754. fi
  755.  
  756. echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
  757. echo "configure:758: checking for working autoheader" >&5
  758. # Run test in a subshell; some versions of sh will print an error if
  759. # an executable is not found, even if stderr is redirected.
  760. # Redirect stdin to placate older versions of autoconf.  Sigh.
  761. if (autoheader --version) < /dev/null > /dev/null 2>&1; then
  762.    AUTOHEADER=autoheader
  763.    echo "$ac_t""found" 1>&6
  764. else
  765.    AUTOHEADER="$missing_dir/missing autoheader"
  766.    echo "$ac_t""missing" 1>&6
  767. fi
  768.  
  769. echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
  770. echo "configure:771: checking for working makeinfo" >&5
  771. # Run test in a subshell; some versions of sh will print an error if
  772. # an executable is not found, even if stderr is redirected.
  773. # Redirect stdin to placate older versions of autoconf.  Sigh.
  774. if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
  775.    MAKEINFO=makeinfo
  776.    echo "$ac_t""found" 1>&6
  777. else
  778.    MAKEINFO="$missing_dir/missing makeinfo"
  779.    echo "$ac_t""missing" 1>&6
  780. fi
  781.  
  782.  
  783.  
  784.  
  785. gengetoptdocdir=$datadir/doc/gengetopt
  786.  
  787.  
  788. gengetoptexamplesdir=$gengetoptdocdir/examples
  789.  
  790. # Extract the first word of "gcc", so it can be a program name with args.
  791. set dummy gcc; ac_word=$2
  792. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  793. echo "configure:794: checking for $ac_word" >&5
  794. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  795.   echo $ac_n "(cached) $ac_c" 1>&6
  796. else
  797.   if test -n "$CC"; then
  798.   ac_cv_prog_CC="$CC" # Let the user override the test.
  799. else
  800.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  801.   ac_dummy="$PATH"
  802.   for ac_dir in $ac_dummy; do
  803.     test -z "$ac_dir" && ac_dir=.
  804.     if test -f $ac_dir/$ac_word; then
  805.       ac_cv_prog_CC="gcc"
  806.       break
  807.     fi
  808.   done
  809.   IFS="$ac_save_ifs"
  810. fi
  811. fi
  812. CC="$ac_cv_prog_CC"
  813. if test -n "$CC"; then
  814.   echo "$ac_t""$CC" 1>&6
  815. else
  816.   echo "$ac_t""no" 1>&6
  817. fi
  818.  
  819. if test -z "$CC"; then
  820.   # Extract the first word of "cc", so it can be a program name with args.
  821. set dummy cc; ac_word=$2
  822. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  823. echo "configure:824: checking for $ac_word" >&5
  824. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  825.   echo $ac_n "(cached) $ac_c" 1>&6
  826. else
  827.   if test -n "$CC"; then
  828.   ac_cv_prog_CC="$CC" # Let the user override the test.
  829. else
  830.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  831.   ac_prog_rejected=no
  832.   ac_dummy="$PATH"
  833.   for ac_dir in $ac_dummy; do
  834.     test -z "$ac_dir" && ac_dir=.
  835.     if test -f $ac_dir/$ac_word; then
  836.       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  837.         ac_prog_rejected=yes
  838.     continue
  839.       fi
  840.       ac_cv_prog_CC="cc"
  841.       break
  842.     fi
  843.   done
  844.   IFS="$ac_save_ifs"
  845. if test $ac_prog_rejected = yes; then
  846.   # We found a bogon in the path, so make sure we never use it.
  847.   set dummy $ac_cv_prog_CC
  848.   shift
  849.   if test $# -gt 0; then
  850.     # We chose a different compiler from the bogus one.
  851.     # However, it has the same basename, so the bogon will be chosen
  852.     # first if we set CC to just the basename; use the full file name.
  853.     shift
  854.     set dummy "$ac_dir/$ac_word" "$@"
  855.     shift
  856.     ac_cv_prog_CC="$@"
  857.   fi
  858. fi
  859. fi
  860. fi
  861. CC="$ac_cv_prog_CC"
  862. if test -n "$CC"; then
  863.   echo "$ac_t""$CC" 1>&6
  864. else
  865.   echo "$ac_t""no" 1>&6
  866. fi
  867.  
  868.   if test -z "$CC"; then
  869.     case "`uname -s`" in
  870.     *win32* | *WIN32*)
  871.       # Extract the first word of "cl", so it can be a program name with args.
  872. set dummy cl; ac_word=$2
  873. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  874. echo "configure:875: checking for $ac_word" >&5
  875. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  876.   echo $ac_n "(cached) $ac_c" 1>&6
  877. else
  878.   if test -n "$CC"; then
  879.   ac_cv_prog_CC="$CC" # Let the user override the test.
  880. else
  881.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  882.   ac_dummy="$PATH"
  883.   for ac_dir in $ac_dummy; do
  884.     test -z "$ac_dir" && ac_dir=.
  885.     if test -f $ac_dir/$ac_word; then
  886.       ac_cv_prog_CC="cl"
  887.       break
  888.     fi
  889.   done
  890.   IFS="$ac_save_ifs"
  891. fi
  892. fi
  893. CC="$ac_cv_prog_CC"
  894. if test -n "$CC"; then
  895.   echo "$ac_t""$CC" 1>&6
  896. else
  897.   echo "$ac_t""no" 1>&6
  898. fi
  899.  ;;
  900.     esac
  901.   fi
  902.   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  903. fi
  904.  
  905. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  906. echo "configure:907: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  907.  
  908. ac_ext=c
  909. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  910. ac_cpp='$CPP $CPPFLAGS'
  911. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  912. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  913. cross_compiling=$ac_cv_prog_cc_cross
  914.  
  915. cat > conftest.$ac_ext << EOF
  916.  
  917. #line 918 "configure"
  918. #include "confdefs.h"
  919.  
  920. main(){return(0);}
  921. EOF
  922. if { (eval echo configure:923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  923.   ac_cv_prog_cc_works=yes
  924.   # If we can't run a trivial program, we are probably using a cross compiler.
  925.   if (./conftest; exit) 2>/dev/null; then
  926.     ac_cv_prog_cc_cross=no
  927.   else
  928.     ac_cv_prog_cc_cross=yes
  929.   fi
  930. else
  931.   echo "configure: failed program was:" >&5
  932.   cat conftest.$ac_ext >&5
  933.   ac_cv_prog_cc_works=no
  934. fi
  935. rm -fr conftest*
  936. ac_ext=c
  937. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  938. ac_cpp='$CPP $CPPFLAGS'
  939. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  940. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  941. cross_compiling=$ac_cv_prog_cc_cross
  942.  
  943. echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
  944. if test $ac_cv_prog_cc_works = no; then
  945.   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  946. fi
  947. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  948. echo "configure:949: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  949. echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  950. cross_compiling=$ac_cv_prog_cc_cross
  951.  
  952. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  953. echo "configure:954: checking whether we are using GNU C" >&5
  954. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  955.   echo $ac_n "(cached) $ac_c" 1>&6
  956. else
  957.   cat > conftest.c <<EOF
  958. #ifdef __GNUC__
  959.   yes;
  960. #endif
  961. EOF
  962. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  963.   ac_cv_prog_gcc=yes
  964. else
  965.   ac_cv_prog_gcc=no
  966. fi
  967. fi
  968.  
  969. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  970.  
  971. if test $ac_cv_prog_gcc = yes; then
  972.   GCC=yes
  973. else
  974.   GCC=
  975. fi
  976.  
  977. ac_test_CFLAGS="${CFLAGS+set}"
  978. ac_save_CFLAGS="$CFLAGS"
  979. CFLAGS=
  980. echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  981. echo "configure:982: checking whether ${CC-cc} accepts -g" >&5
  982. if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  983.   echo $ac_n "(cached) $ac_c" 1>&6
  984. else
  985.   echo 'void f(){}' > conftest.c
  986. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  987.   ac_cv_prog_cc_g=yes
  988. else
  989.   ac_cv_prog_cc_g=no
  990. fi
  991. rm -f conftest*
  992.  
  993. fi
  994.  
  995. echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  996. if test "$ac_test_CFLAGS" = set; then
  997.   CFLAGS="$ac_save_CFLAGS"
  998. elif test $ac_cv_prog_cc_g = yes; then
  999.   if test "$GCC" = yes; then
  1000.     CFLAGS="-g -O2"
  1001.   else
  1002.     CFLAGS="-g"
  1003.   fi
  1004. else
  1005.   if test "$GCC" = yes; then
  1006.     CFLAGS="-O2"
  1007.   else
  1008.     CFLAGS=
  1009.   fi
  1010. fi
  1011.  
  1012.  
  1013.  
  1014.   if test -z "$GCC"; then
  1015.     echo $ac_n "checking whether ${CC-cc} accepts -Aa""... $ac_c" 1>&6
  1016. echo "configure:1017: checking whether ${CC-cc} accepts -Aa" >&5
  1017. if eval "test \"`echo '$''{'ac_cv_cc_aa_flag'+set}'`\" = set"; then
  1018.   echo $ac_n "(cached) $ac_c" 1>&6
  1019. else
  1020.   echo 'void f(){}' > conftest.c
  1021. if test -z "`${CC-cc} -Aa -c conftest.c 2>&1`"; then
  1022.   ac_cv_cc_aa_flag=yes
  1023. else
  1024.   ac_cv_cc_aa_flag=no
  1025. fi
  1026. rm -f conftest*
  1027.  
  1028. fi
  1029.  
  1030. echo "$ac_t""$ac_cv_cc_aa_flag" 1>&6
  1031.     if test $ac_cv_cc_aa_flag = yes; then
  1032.       CFLAGS="$CFLAGS -Aa"
  1033.     fi
  1034.   fi
  1035.  
  1036.  
  1037. echo $ac_n "checking for working const""... $ac_c" 1>&6
  1038. echo "configure:1039: checking for working const" >&5
  1039. if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  1040.   echo $ac_n "(cached) $ac_c" 1>&6
  1041. else
  1042.   cat > conftest.$ac_ext <<EOF
  1043. #line 1044 "configure"
  1044. #include "confdefs.h"
  1045.  
  1046. int main() {
  1047.  
  1048. /* Ultrix mips cc rejects this.  */
  1049. typedef int charset[2]; const charset x;
  1050. /* SunOS 4.1.1 cc rejects this.  */
  1051. char const *const *ccp;
  1052. char **p;
  1053. /* NEC SVR4.0.2 mips cc rejects this.  */
  1054. struct point {int x, y;};
  1055. static struct point const zero = {0,0};
  1056. /* AIX XL C 1.02.0.0 rejects this.
  1057.    It does not let you subtract one const X* pointer from another in an arm
  1058.    of an if-expression whose if-part is not a constant expression */
  1059. const char *g = "string";
  1060. ccp = &g + (g ? g-g : 0);
  1061. /* HPUX 7.0 cc rejects these. */
  1062. ++ccp;
  1063. p = (char**) ccp;
  1064. ccp = (char const *const *) p;
  1065. { /* SCO 3.2v4 cc rejects this.  */
  1066.   char *t;
  1067.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  1068.  
  1069.   *t++ = 0;
  1070. }
  1071. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  1072.   int x[] = {25, 17};
  1073.   const int *foo = &x[0];
  1074.   ++foo;
  1075. }
  1076. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  1077.   typedef const int *iptr;
  1078.   iptr p = 0;
  1079.   ++p;
  1080. }
  1081. { /* AIX XL C 1.02.0.0 rejects this saying
  1082.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  1083.   struct s { int j; const int *ap[3]; };
  1084.   struct s *b; b->j = 5;
  1085. }
  1086. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  1087.   const int foo = 10;
  1088. }
  1089.  
  1090. ; return 0; }
  1091. EOF
  1092. if { (eval echo configure:1093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1093.   rm -rf conftest*
  1094.   ac_cv_c_const=yes
  1095. else
  1096.   echo "configure: failed program was:" >&5
  1097.   cat conftest.$ac_ext >&5
  1098.   rm -rf conftest*
  1099.   ac_cv_c_const=no
  1100. fi
  1101. rm -f conftest*
  1102. fi
  1103.  
  1104. echo "$ac_t""$ac_cv_c_const" 1>&6
  1105. if test $ac_cv_c_const = no; then
  1106.   cat >> confdefs.h <<\EOF
  1107. #define const 
  1108. EOF
  1109.  
  1110. fi
  1111.  
  1112. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  1113. echo "configure:1114: checking how to run the C preprocessor" >&5
  1114. # On Suns, sometimes $CPP names a directory.
  1115. if test -n "$CPP" && test -d "$CPP"; then
  1116.   CPP=
  1117. fi
  1118. if test -z "$CPP"; then
  1119. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  1120.   echo $ac_n "(cached) $ac_c" 1>&6
  1121. else
  1122.     # This must be in double quotes, not single quotes, because CPP may get
  1123.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  1124.   CPP="${CC-cc} -E"
  1125.   # On the NeXT, cc -E runs the code through the compiler's parser,
  1126.   # not just through cpp.
  1127.   cat > conftest.$ac_ext <<EOF
  1128. #line 1129 "configure"
  1129. #include "confdefs.h"
  1130. #include <assert.h>
  1131. Syntax Error
  1132. EOF
  1133. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1134. { (eval echo configure:1135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1135. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1136. if test -z "$ac_err"; then
  1137.   :
  1138. else
  1139.   echo "$ac_err" >&5
  1140.   echo "configure: failed program was:" >&5
  1141.   cat conftest.$ac_ext >&5
  1142.   rm -rf conftest*
  1143.   CPP="${CC-cc} -E -traditional-cpp"
  1144.   cat > conftest.$ac_ext <<EOF
  1145. #line 1146 "configure"
  1146. #include "confdefs.h"
  1147. #include <assert.h>
  1148. Syntax Error
  1149. EOF
  1150. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1151. { (eval echo configure:1152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1152. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1153. if test -z "$ac_err"; then
  1154.   :
  1155. else
  1156.   echo "$ac_err" >&5
  1157.   echo "configure: failed program was:" >&5
  1158.   cat conftest.$ac_ext >&5
  1159.   rm -rf conftest*
  1160.   CPP="${CC-cc} -nologo -E"
  1161.   cat > conftest.$ac_ext <<EOF
  1162. #line 1163 "configure"
  1163. #include "confdefs.h"
  1164. #include <assert.h>
  1165. Syntax Error
  1166. EOF
  1167. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1168. { (eval echo configure:1169: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1169. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1170. if test -z "$ac_err"; then
  1171.   :
  1172. else
  1173.   echo "$ac_err" >&5
  1174.   echo "configure: failed program was:" >&5
  1175.   cat conftest.$ac_ext >&5
  1176.   rm -rf conftest*
  1177.   CPP=/lib/cpp
  1178. fi
  1179. rm -f conftest*
  1180. fi
  1181. rm -f conftest*
  1182. fi
  1183. rm -f conftest*
  1184.   ac_cv_prog_CPP="$CPP"
  1185. fi
  1186.   CPP="$ac_cv_prog_CPP"
  1187. else
  1188.   ac_cv_prog_CPP="$CPP"
  1189. fi
  1190. echo "$ac_t""$CPP" 1>&6
  1191.  
  1192. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  1193. echo "configure:1194: checking for ANSI C header files" >&5
  1194. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  1195.   echo $ac_n "(cached) $ac_c" 1>&6
  1196. else
  1197.   cat > conftest.$ac_ext <<EOF
  1198. #line 1199 "configure"
  1199. #include "confdefs.h"
  1200. #include <stdlib.h>
  1201. #include <stdarg.h>
  1202. #include <string.h>
  1203. #include <float.h>
  1204. EOF
  1205. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1206. { (eval echo configure:1207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1207. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1208. if test -z "$ac_err"; then
  1209.   rm -rf conftest*
  1210.   ac_cv_header_stdc=yes
  1211. else
  1212.   echo "$ac_err" >&5
  1213.   echo "configure: failed program was:" >&5
  1214.   cat conftest.$ac_ext >&5
  1215.   rm -rf conftest*
  1216.   ac_cv_header_stdc=no
  1217. fi
  1218. rm -f conftest*
  1219.  
  1220. if test $ac_cv_header_stdc = yes; then
  1221.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  1222. cat > conftest.$ac_ext <<EOF
  1223. #line 1224 "configure"
  1224. #include "confdefs.h"
  1225. #include <string.h>
  1226. EOF
  1227. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1228.   egrep "memchr" >/dev/null 2>&1; then
  1229.   :
  1230. else
  1231.   rm -rf conftest*
  1232.   ac_cv_header_stdc=no
  1233. fi
  1234. rm -f conftest*
  1235.  
  1236. fi
  1237.  
  1238. if test $ac_cv_header_stdc = yes; then
  1239.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  1240. cat > conftest.$ac_ext <<EOF
  1241. #line 1242 "configure"
  1242. #include "confdefs.h"
  1243. #include <stdlib.h>
  1244. EOF
  1245. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1246.   egrep "free" >/dev/null 2>&1; then
  1247.   :
  1248. else
  1249.   rm -rf conftest*
  1250.   ac_cv_header_stdc=no
  1251. fi
  1252. rm -f conftest*
  1253.  
  1254. fi
  1255.  
  1256. if test $ac_cv_header_stdc = yes; then
  1257.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  1258. if test "$cross_compiling" = yes; then
  1259.   :
  1260. else
  1261.   cat > conftest.$ac_ext <<EOF
  1262. #line 1263 "configure"
  1263. #include "confdefs.h"
  1264. #include <ctype.h>
  1265. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  1266. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  1267. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  1268. int main () { int i; for (i = 0; i < 256; i++)
  1269. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  1270. exit (0); }
  1271.  
  1272. EOF
  1273. if { (eval echo configure:1274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1274. then
  1275.   :
  1276. else
  1277.   echo "configure: failed program was:" >&5
  1278.   cat conftest.$ac_ext >&5
  1279.   rm -fr conftest*
  1280.   ac_cv_header_stdc=no
  1281. fi
  1282. rm -fr conftest*
  1283. fi
  1284.  
  1285. fi
  1286. fi
  1287.  
  1288. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  1289. if test $ac_cv_header_stdc = yes; then
  1290.   cat >> confdefs.h <<\EOF
  1291. #define STDC_HEADERS 1
  1292. EOF
  1293.  
  1294. fi
  1295.  
  1296. echo $ac_n "checking for size_t""... $ac_c" 1>&6
  1297. echo "configure:1298: checking for size_t" >&5
  1298. if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  1299.   echo $ac_n "(cached) $ac_c" 1>&6
  1300. else
  1301.   cat > conftest.$ac_ext <<EOF
  1302. #line 1303 "configure"
  1303. #include "confdefs.h"
  1304. #include <sys/types.h>
  1305. #if STDC_HEADERS
  1306. #include <stdlib.h>
  1307. #include <stddef.h>
  1308. #endif
  1309. EOF
  1310. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1311.   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  1312.   rm -rf conftest*
  1313.   ac_cv_type_size_t=yes
  1314. else
  1315.   rm -rf conftest*
  1316.   ac_cv_type_size_t=no
  1317. fi
  1318. rm -f conftest*
  1319.  
  1320. fi
  1321. echo "$ac_t""$ac_cv_type_size_t" 1>&6
  1322. if test $ac_cv_type_size_t = no; then
  1323.   cat >> confdefs.h <<\EOF
  1324. #define size_t unsigned
  1325. EOF
  1326.  
  1327. fi
  1328.  
  1329.  
  1330. for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
  1331. do
  1332. # Extract the first word of "$ac_prog", so it can be a program name with args.
  1333. set dummy $ac_prog; ac_word=$2
  1334. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1335. echo "configure:1336: checking for $ac_word" >&5
  1336. if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
  1337.   echo $ac_n "(cached) $ac_c" 1>&6
  1338. else
  1339.   if test -n "$CXX"; then
  1340.   ac_cv_prog_CXX="$CXX" # Let the user override the test.
  1341. else
  1342.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  1343.   ac_dummy="$PATH"
  1344.   for ac_dir in $ac_dummy; do
  1345.     test -z "$ac_dir" && ac_dir=.
  1346.     if test -f $ac_dir/$ac_word; then
  1347.       ac_cv_prog_CXX="$ac_prog"
  1348.       break
  1349.     fi
  1350.   done
  1351.   IFS="$ac_save_ifs"
  1352. fi
  1353. fi
  1354. CXX="$ac_cv_prog_CXX"
  1355. if test -n "$CXX"; then
  1356.   echo "$ac_t""$CXX" 1>&6
  1357. else
  1358.   echo "$ac_t""no" 1>&6
  1359. fi
  1360.  
  1361. test -n "$CXX" && break
  1362. done
  1363. test -n "$CXX" || CXX="gcc"
  1364.  
  1365.  
  1366. echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  1367. echo "configure:1368: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
  1368.  
  1369. ac_ext=C
  1370. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  1371. ac_cpp='$CXXCPP $CPPFLAGS'
  1372. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  1373. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  1374. cross_compiling=$ac_cv_prog_cxx_cross
  1375.  
  1376. cat > conftest.$ac_ext << EOF
  1377.  
  1378. #line 1379 "configure"
  1379. #include "confdefs.h"
  1380.  
  1381. int main(){return(0);}
  1382. EOF
  1383. if { (eval echo configure:1384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1384.   ac_cv_prog_cxx_works=yes
  1385.   # If we can't run a trivial program, we are probably using a cross compiler.
  1386.   if (./conftest; exit) 2>/dev/null; then
  1387.     ac_cv_prog_cxx_cross=no
  1388.   else
  1389.     ac_cv_prog_cxx_cross=yes
  1390.   fi
  1391. else
  1392.   echo "configure: failed program was:" >&5
  1393.   cat conftest.$ac_ext >&5
  1394.   ac_cv_prog_cxx_works=no
  1395. fi
  1396. rm -fr conftest*
  1397. ac_ext=c
  1398. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  1399. ac_cpp='$CPP $CPPFLAGS'
  1400. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  1401. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  1402. cross_compiling=$ac_cv_prog_cc_cross
  1403.  
  1404. echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
  1405. if test $ac_cv_prog_cxx_works = no; then
  1406.   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
  1407. fi
  1408. echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  1409. echo "configure:1410: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
  1410. echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
  1411. cross_compiling=$ac_cv_prog_cxx_cross
  1412.  
  1413. echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
  1414. echo "configure:1415: checking whether we are using GNU C++" >&5
  1415. if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
  1416.   echo $ac_n "(cached) $ac_c" 1>&6
  1417. else
  1418.   cat > conftest.C <<EOF
  1419. #ifdef __GNUC__
  1420.   yes;
  1421. #endif
  1422. EOF
  1423. if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  1424.   ac_cv_prog_gxx=yes
  1425. else
  1426.   ac_cv_prog_gxx=no
  1427. fi
  1428. fi
  1429.  
  1430. echo "$ac_t""$ac_cv_prog_gxx" 1>&6
  1431.  
  1432. if test $ac_cv_prog_gxx = yes; then
  1433.   GXX=yes
  1434. else
  1435.   GXX=
  1436. fi
  1437.  
  1438. ac_test_CXXFLAGS="${CXXFLAGS+set}"
  1439. ac_save_CXXFLAGS="$CXXFLAGS"
  1440. CXXFLAGS=
  1441. echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
  1442. echo "configure:1443: checking whether ${CXX-g++} accepts -g" >&5
  1443. if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
  1444.   echo $ac_n "(cached) $ac_c" 1>&6
  1445. else
  1446.   echo 'void f(){}' > conftest.cc
  1447. if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
  1448.   ac_cv_prog_cxx_g=yes
  1449. else
  1450.   ac_cv_prog_cxx_g=no
  1451. fi
  1452. rm -f conftest*
  1453.  
  1454. fi
  1455.  
  1456. echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
  1457. if test "$ac_test_CXXFLAGS" = set; then
  1458.   CXXFLAGS="$ac_save_CXXFLAGS"
  1459. elif test $ac_cv_prog_cxx_g = yes; then
  1460.   if test "$GXX" = yes; then
  1461.     CXXFLAGS="-g -O2"
  1462.   else
  1463.     CXXFLAGS="-g"
  1464.   fi
  1465. else
  1466.   if test "$GXX" = yes; then
  1467.     CXXFLAGS="-O2"
  1468.   else
  1469.     CXXFLAGS=
  1470.   fi
  1471. fi
  1472.  
  1473.  
  1474. # Check whether --enable-warnings or --disable-warnings was given.
  1475. if test "${enable_warnings+set}" = set; then
  1476.   enableval="$enable_warnings"
  1477.   echo $ac_n "checking maximum warning verbosity option""... $ac_c" 1>&6
  1478. echo "configure:1479: checking maximum warning verbosity option" >&5
  1479. if test -n "$CXX"
  1480. then
  1481.   if test "$GXX" = "yes"
  1482.   then
  1483.     ac_compile_warnings_opt='-Wall'
  1484.   fi
  1485.   CXXFLAGS="$CXXFLAGS $ac_compile_warnings_opt"
  1486.   ac_compile_warnings_msg="$ac_compile_warnings_opt for C++"
  1487. fi
  1488.  
  1489. if test -n "$CC"
  1490. then
  1491.   if test "$GCC" = "yes"
  1492.   then
  1493.     ac_compile_warnings_opt='-Wall'
  1494.   fi
  1495.   CFLAGS="$CFLAGS $ac_compile_warnings_opt"
  1496.   ac_compile_warnings_msg="$ac_compile_warnings_msg $ac_compile_warnings_opt for C"
  1497. fi
  1498. echo "$ac_t""$ac_compile_warnings_msg" 1>&6
  1499. unset ac_compile_warnings_msg
  1500. unset ac_compile_warnings_opt
  1501.  
  1502. fi
  1503.  
  1504.  
  1505. echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
  1506. echo "configure:1507: checking for Cygwin environment" >&5
  1507. if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
  1508.   echo $ac_n "(cached) $ac_c" 1>&6
  1509. else
  1510.   cat > conftest.$ac_ext <<EOF
  1511. #line 1512 "configure"
  1512. #include "confdefs.h"
  1513.  
  1514. int main() {
  1515.  
  1516. #ifndef __CYGWIN__
  1517. #define __CYGWIN__ __CYGWIN32__
  1518. #endif
  1519. return __CYGWIN__;
  1520. ; return 0; }
  1521. EOF
  1522. if { (eval echo configure:1523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1523.   rm -rf conftest*
  1524.   ac_cv_cygwin=yes
  1525. else
  1526.   echo "configure: failed program was:" >&5
  1527.   cat conftest.$ac_ext >&5
  1528.   rm -rf conftest*
  1529.   ac_cv_cygwin=no
  1530. fi
  1531. rm -f conftest*
  1532. rm -f conftest*
  1533. fi
  1534.  
  1535. echo "$ac_t""$ac_cv_cygwin" 1>&6
  1536. CYGWIN=
  1537. test "$ac_cv_cygwin" = yes && CYGWIN=yes
  1538. echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
  1539. echo "configure:1540: checking for mingw32 environment" >&5
  1540. if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
  1541.   echo $ac_n "(cached) $ac_c" 1>&6
  1542. else
  1543.   cat > conftest.$ac_ext <<EOF
  1544. #line 1545 "configure"
  1545. #include "confdefs.h"
  1546.  
  1547. int main() {
  1548. return __MINGW32__;
  1549. ; return 0; }
  1550. EOF
  1551. if { (eval echo configure:1552: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1552.   rm -rf conftest*
  1553.   ac_cv_mingw32=yes
  1554. else
  1555.   echo "configure: failed program was:" >&5
  1556.   cat conftest.$ac_ext >&5
  1557.   rm -rf conftest*
  1558.   ac_cv_mingw32=no
  1559. fi
  1560. rm -f conftest*
  1561. rm -f conftest*
  1562. fi
  1563.  
  1564. echo "$ac_t""$ac_cv_mingw32" 1>&6
  1565. MINGW32=
  1566. test "$ac_cv_mingw32" = yes && MINGW32=yes
  1567.  
  1568.  
  1569. echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
  1570. echo "configure:1571: checking for executable suffix" >&5
  1571. if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
  1572.   echo $ac_n "(cached) $ac_c" 1>&6
  1573. else
  1574.   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
  1575.   ac_cv_exeext=.exe
  1576. else
  1577.   rm -f conftest*
  1578.   echo 'int main () { return 0; }' > conftest.$ac_ext
  1579.   ac_cv_exeext=
  1580.   if { (eval echo configure:1581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1581.     for file in conftest.*; do
  1582.       case $file in
  1583.       *.c | *.o | *.obj) ;;
  1584.       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
  1585.       esac
  1586.     done
  1587.   else
  1588.     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
  1589.   fi
  1590.   rm -f conftest*
  1591.   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
  1592. fi
  1593. fi
  1594.  
  1595. EXEEXT=""
  1596. test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
  1597. echo "$ac_t""${ac_cv_exeext}" 1>&6
  1598. ac_exeext=$EXEEXT
  1599.  
  1600.  
  1601. for ac_prog in gawk mawk nawk awk
  1602. do
  1603. # Extract the first word of "$ac_prog", so it can be a program name with args.
  1604. set dummy $ac_prog; ac_word=$2
  1605. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1606. echo "configure:1607: checking for $ac_word" >&5
  1607. if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
  1608.   echo $ac_n "(cached) $ac_c" 1>&6
  1609. else
  1610.   if test -n "$AWK"; then
  1611.   ac_cv_prog_AWK="$AWK" # Let the user override the test.
  1612. else
  1613.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  1614.   ac_dummy="$PATH"
  1615.   for ac_dir in $ac_dummy; do
  1616.     test -z "$ac_dir" && ac_dir=.
  1617.     if test -f $ac_dir/$ac_word; then
  1618.       ac_cv_prog_AWK="$ac_prog"
  1619.       break
  1620.     fi
  1621.   done
  1622.   IFS="$ac_save_ifs"
  1623. fi
  1624. fi
  1625. AWK="$ac_cv_prog_AWK"
  1626. if test -n "$AWK"; then
  1627.   echo "$ac_t""$AWK" 1>&6
  1628. else
  1629.   echo "$ac_t""no" 1>&6
  1630. fi
  1631.  
  1632. test -n "$AWK" && break
  1633. done
  1634.  
  1635.  
  1636.   echo $ac_n "checking for the txtc compiler""... $ac_c" 1>&6
  1637. echo "configure:1638: checking for the txtc compiler" >&5
  1638.   TXTC='$(SHELL) $(top_builddir)/txtc.sh'
  1639.   if test -f $srcdir/txtc.sh.in
  1640.   then
  1641.     echo "$ac_t""yes" 1>&6  
  1642.   else
  1643.     echo "$ac_t""no" 1>&6
  1644.     echo "configure: warning: Cannot find the txtc.sh compiler." 1>&2
  1645.     echo "configure: warning: Please use the mktxtc utility to generate one at the" 1>&2, 
  1646.     echo "configure: warning: toplevel directory, otherwise this package will not compile." 1>&2
  1647.   fi
  1648.   
  1649.  
  1650.  
  1651. for ac_prog in 'bison -y' byacc
  1652. do
  1653. # Extract the first word of "$ac_prog", so it can be a program name with args.
  1654. set dummy $ac_prog; ac_word=$2
  1655. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1656. echo "configure:1657: checking for $ac_word" >&5
  1657. if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
  1658.   echo $ac_n "(cached) $ac_c" 1>&6
  1659. else
  1660.   if test -n "$YACC"; then
  1661.   ac_cv_prog_YACC="$YACC" # Let the user override the test.
  1662. else
  1663.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  1664.   ac_dummy="$PATH"
  1665.   for ac_dir in $ac_dummy; do
  1666.     test -z "$ac_dir" && ac_dir=.
  1667.     if test -f $ac_dir/$ac_word; then
  1668.       ac_cv_prog_YACC="$ac_prog"
  1669.       break
  1670.     fi
  1671.   done
  1672.   IFS="$ac_save_ifs"
  1673. fi
  1674. fi
  1675. YACC="$ac_cv_prog_YACC"
  1676. if test -n "$YACC"; then
  1677.   echo "$ac_t""$YACC" 1>&6
  1678. else
  1679.   echo "$ac_t""no" 1>&6
  1680. fi
  1681.  
  1682. test -n "$YACC" && break
  1683. done
  1684. test -n "$YACC" || YACC="yacc"
  1685.  
  1686.  
  1687. YFLAGS="$YFLAGS -d"
  1688.  
  1689. missing_dir=`cd $ac_aux_dir && pwd`
  1690. for ac_prog in flex lex
  1691. do
  1692. # Extract the first word of "$ac_prog", so it can be a program name with args.
  1693. set dummy $ac_prog; ac_word=$2
  1694. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1695. echo "configure:1696: checking for $ac_word" >&5
  1696. if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
  1697.   echo $ac_n "(cached) $ac_c" 1>&6
  1698. else
  1699.   if test -n "$LEX"; then
  1700.   ac_cv_prog_LEX="$LEX" # Let the user override the test.
  1701. else
  1702.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  1703.   ac_dummy="$PATH"
  1704.   for ac_dir in $ac_dummy; do
  1705.     test -z "$ac_dir" && ac_dir=.
  1706.     if test -f $ac_dir/$ac_word; then
  1707.       ac_cv_prog_LEX="$ac_prog"
  1708.       break
  1709.     fi
  1710.   done
  1711.   IFS="$ac_save_ifs"
  1712. fi
  1713. fi
  1714. LEX="$ac_cv_prog_LEX"
  1715. if test -n "$LEX"; then
  1716.   echo "$ac_t""$LEX" 1>&6
  1717. else
  1718.   echo "$ac_t""no" 1>&6
  1719. fi
  1720.  
  1721. test -n "$LEX" && break
  1722. done
  1723. test -n "$LEX" || LEX=""$missing_dir/missing flex""
  1724.  
  1725. # Extract the first word of "flex", so it can be a program name with args.
  1726. set dummy flex; ac_word=$2
  1727. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1728. echo "configure:1729: checking for $ac_word" >&5
  1729. if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
  1730.   echo $ac_n "(cached) $ac_c" 1>&6
  1731. else
  1732.   if test -n "$LEX"; then
  1733.   ac_cv_prog_LEX="$LEX" # Let the user override the test.
  1734. else
  1735.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  1736.   ac_dummy="$PATH"
  1737.   for ac_dir in $ac_dummy; do
  1738.     test -z "$ac_dir" && ac_dir=.
  1739.     if test -f $ac_dir/$ac_word; then
  1740.       ac_cv_prog_LEX="flex"
  1741.       break
  1742.     fi
  1743.   done
  1744.   IFS="$ac_save_ifs"
  1745.   test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
  1746. fi
  1747. fi
  1748. LEX="$ac_cv_prog_LEX"
  1749. if test -n "$LEX"; then
  1750.   echo "$ac_t""$LEX" 1>&6
  1751. else
  1752.   echo "$ac_t""no" 1>&6
  1753. fi
  1754.  
  1755. if test -z "$LEXLIB"
  1756. then
  1757.   case "$LEX" in
  1758.   flex*) ac_lib=fl ;;
  1759.   *) ac_lib=l ;;
  1760.   esac
  1761.   echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
  1762. echo "configure:1763: checking for yywrap in -l$ac_lib" >&5
  1763. ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
  1764. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1765.   echo $ac_n "(cached) $ac_c" 1>&6
  1766. else
  1767.   ac_save_LIBS="$LIBS"
  1768. LIBS="-l$ac_lib  $LIBS"
  1769. cat > conftest.$ac_ext <<EOF
  1770. #line 1771 "configure"
  1771. #include "confdefs.h"
  1772. /* Override any gcc2 internal prototype to avoid an error.  */
  1773. /* We use char because int might match the return type of a gcc2
  1774.     builtin and then its argument prototype would still apply.  */
  1775. char yywrap();
  1776.  
  1777. int main() {
  1778. yywrap()
  1779. ; return 0; }
  1780. EOF
  1781. if { (eval echo configure:1782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1782.   rm -rf conftest*
  1783.   eval "ac_cv_lib_$ac_lib_var=yes"
  1784. else
  1785.   echo "configure: failed program was:" >&5
  1786.   cat conftest.$ac_ext >&5
  1787.   rm -rf conftest*
  1788.   eval "ac_cv_lib_$ac_lib_var=no"
  1789. fi
  1790. rm -f conftest*
  1791. LIBS="$ac_save_LIBS"
  1792.  
  1793. fi
  1794. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1795.   echo "$ac_t""yes" 1>&6
  1796.   LEXLIB="-l$ac_lib"
  1797. else
  1798.   echo "$ac_t""no" 1>&6
  1799. fi
  1800.  
  1801. fi
  1802.  
  1803. echo $ac_n "checking lex output file root""... $ac_c" 1>&6
  1804. echo "configure:1805: checking lex output file root" >&5
  1805. if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
  1806.   echo $ac_n "(cached) $ac_c" 1>&6
  1807. else
  1808.   # The minimal lex program is just a single line: %%.  But some broken lexes
  1809. # (Solaris, I think it was) want two %% lines, so accommodate them.
  1810. echo '%%
  1811. %%' | $LEX
  1812. if test -f lex.yy.c; then
  1813.   ac_cv_prog_lex_root=lex.yy
  1814. elif test -f lexyy.c; then
  1815.   ac_cv_prog_lex_root=lexyy
  1816. else
  1817.   { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
  1818. fi
  1819. fi
  1820.  
  1821. echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
  1822. LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
  1823.  
  1824. echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
  1825. echo "configure:1826: checking whether yytext is a pointer" >&5
  1826. if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
  1827.   echo $ac_n "(cached) $ac_c" 1>&6
  1828. else
  1829.   # POSIX says lex can declare yytext either as a pointer or an array; the
  1830. # default is implementation-dependent. Figure out which it is, since
  1831. # not all implementations provide the %pointer and %array declarations.
  1832. ac_cv_prog_lex_yytext_pointer=no
  1833. echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
  1834. ac_save_LIBS="$LIBS"
  1835. LIBS="$LIBS $LEXLIB"
  1836. cat > conftest.$ac_ext <<EOF
  1837. #line 1838 "configure"
  1838. #include "confdefs.h"
  1839. `cat $LEX_OUTPUT_ROOT.c`
  1840. int main() {
  1841.  
  1842. ; return 0; }
  1843. EOF
  1844. if { (eval echo configure:1845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1845.   rm -rf conftest*
  1846.   ac_cv_prog_lex_yytext_pointer=yes
  1847. else
  1848.   echo "configure: failed program was:" >&5
  1849.   cat conftest.$ac_ext >&5
  1850. fi
  1851. rm -f conftest*
  1852. LIBS="$ac_save_LIBS"
  1853. rm -f "${LEX_OUTPUT_ROOT}.c"
  1854.  
  1855. fi
  1856.  
  1857. echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
  1858. if test $ac_cv_prog_lex_yytext_pointer = yes; then
  1859.   cat >> confdefs.h <<\EOF
  1860. #define YYTEXT_POINTER 1
  1861. EOF
  1862.  
  1863. fi
  1864.  
  1865.  
  1866. echo $ac_n "checking for main in -lfl""... $ac_c" 1>&6
  1867. echo "configure:1868: checking for main in -lfl" >&5
  1868. ac_lib_var=`echo fl'_'main | sed 'y%./+-%__p_%'`
  1869. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1870.   echo $ac_n "(cached) $ac_c" 1>&6
  1871. else
  1872.   ac_save_LIBS="$LIBS"
  1873. LIBS="-lfl  $LIBS"
  1874. cat > conftest.$ac_ext <<EOF
  1875. #line 1876 "configure"
  1876. #include "confdefs.h"
  1877.  
  1878. int main() {
  1879. main()
  1880. ; return 0; }
  1881. EOF
  1882. if { (eval echo configure:1883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1883.   rm -rf conftest*
  1884.   eval "ac_cv_lib_$ac_lib_var=yes"
  1885. else
  1886.   echo "configure: failed program was:" >&5
  1887.   cat conftest.$ac_ext >&5
  1888.   rm -rf conftest*
  1889.   eval "ac_cv_lib_$ac_lib_var=no"
  1890. fi
  1891. rm -f conftest*
  1892. LIBS="$ac_save_LIBS"
  1893.  
  1894. fi
  1895. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1896.   echo "$ac_t""yes" 1>&6
  1897.     ac_tr_lib=HAVE_LIB`echo fl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  1898.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  1899.   cat >> confdefs.h <<EOF
  1900. #define $ac_tr_lib 1
  1901. EOF
  1902.  
  1903.   LIBS="-lfl $LIBS"
  1904.  
  1905. else
  1906.   echo "$ac_t""no" 1>&6
  1907. fi
  1908.  
  1909.  
  1910. for ac_func in yywrap
  1911. do
  1912. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1913. echo "configure:1914: checking for $ac_func" >&5
  1914. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1915.   echo $ac_n "(cached) $ac_c" 1>&6
  1916. else
  1917.   cat > conftest.$ac_ext <<EOF
  1918. #line 1919 "configure"
  1919. #include "confdefs.h"
  1920. /* System header to define __stub macros and hopefully few prototypes,
  1921.     which can conflict with char $ac_func(); below.  */
  1922. #include <assert.h>
  1923. /* Override any gcc2 internal prototype to avoid an error.  */
  1924. /* We use char because int might match the return type of a gcc2
  1925.     builtin and then its argument prototype would still apply.  */
  1926. char $ac_func();
  1927.  
  1928. int main() {
  1929.  
  1930. /* The GNU C library defines this for functions which it implements
  1931.     to always fail with ENOSYS.  Some functions are actually named
  1932.     something starting with __ and the normal name is an alias.  */
  1933. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1934. choke me
  1935. #else
  1936. $ac_func();
  1937. #endif
  1938.  
  1939. ; return 0; }
  1940. EOF
  1941. if { (eval echo configure:1942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1942.   rm -rf conftest*
  1943.   eval "ac_cv_func_$ac_func=yes"
  1944. else
  1945.   echo "configure: failed program was:" >&5
  1946.   cat conftest.$ac_ext >&5
  1947.   rm -rf conftest*
  1948.   eval "ac_cv_func_$ac_func=no"
  1949. fi
  1950. rm -f conftest*
  1951. fi
  1952.  
  1953. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1954.   echo "$ac_t""yes" 1>&6
  1955.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1956.   cat >> confdefs.h <<EOF
  1957. #define $ac_tr_func 1
  1958. EOF
  1959.  
  1960. else
  1961.   echo "$ac_t""no" 1>&6
  1962. LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
  1963. fi
  1964. done
  1965.  
  1966.  
  1967.  
  1968. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  1969. echo "configure:1970: checking for ANSI C header files" >&5
  1970. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  1971.   echo $ac_n "(cached) $ac_c" 1>&6
  1972. else
  1973.   cat > conftest.$ac_ext <<EOF
  1974. #line 1975 "configure"
  1975. #include "confdefs.h"
  1976. #include <stdlib.h>
  1977. #include <stdarg.h>
  1978. #include <string.h>
  1979. #include <float.h>
  1980. EOF
  1981. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1982. { (eval echo configure:1983: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1983. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1984. if test -z "$ac_err"; then
  1985.   rm -rf conftest*
  1986.   ac_cv_header_stdc=yes
  1987. else
  1988.   echo "$ac_err" >&5
  1989.   echo "configure: failed program was:" >&5
  1990.   cat conftest.$ac_ext >&5
  1991.   rm -rf conftest*
  1992.   ac_cv_header_stdc=no
  1993. fi
  1994. rm -f conftest*
  1995.  
  1996. if test $ac_cv_header_stdc = yes; then
  1997.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  1998. cat > conftest.$ac_ext <<EOF
  1999. #line 2000 "configure"
  2000. #include "confdefs.h"
  2001. #include <string.h>
  2002. EOF
  2003. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2004.   egrep "memchr" >/dev/null 2>&1; then
  2005.   :
  2006. else
  2007.   rm -rf conftest*
  2008.   ac_cv_header_stdc=no
  2009. fi
  2010. rm -f conftest*
  2011.  
  2012. fi
  2013.  
  2014. if test $ac_cv_header_stdc = yes; then
  2015.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  2016. cat > conftest.$ac_ext <<EOF
  2017. #line 2018 "configure"
  2018. #include "confdefs.h"
  2019. #include <stdlib.h>
  2020. EOF
  2021. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2022.   egrep "free" >/dev/null 2>&1; then
  2023.   :
  2024. else
  2025.   rm -rf conftest*
  2026.   ac_cv_header_stdc=no
  2027. fi
  2028. rm -f conftest*
  2029.  
  2030. fi
  2031.  
  2032. if test $ac_cv_header_stdc = yes; then
  2033.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  2034. if test "$cross_compiling" = yes; then
  2035.   :
  2036. else
  2037.   cat > conftest.$ac_ext <<EOF
  2038. #line 2039 "configure"
  2039. #include "confdefs.h"
  2040. #include <ctype.h>
  2041. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  2042. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  2043. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  2044. int main () { int i; for (i = 0; i < 256; i++)
  2045. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  2046. exit (0); }
  2047.  
  2048. EOF
  2049. if { (eval echo configure:2050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2050. then
  2051.   :
  2052. else
  2053.   echo "configure: failed program was:" >&5
  2054.   cat conftest.$ac_ext >&5
  2055.   rm -fr conftest*
  2056.   ac_cv_header_stdc=no
  2057. fi
  2058. rm -fr conftest*
  2059. fi
  2060.  
  2061. fi
  2062. fi
  2063.  
  2064. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  2065. if test $ac_cv_header_stdc = yes; then
  2066.   cat >> confdefs.h <<\EOF
  2067. #define STDC_HEADERS 1
  2068. EOF
  2069.  
  2070. fi
  2071.  
  2072. for ac_hdr in malloc.h strings.h unistd.h
  2073. do
  2074. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2075. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2076. echo "configure:2077: checking for $ac_hdr" >&5
  2077. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2078.   echo $ac_n "(cached) $ac_c" 1>&6
  2079. else
  2080.   cat > conftest.$ac_ext <<EOF
  2081. #line 2082 "configure"
  2082. #include "confdefs.h"
  2083. #include <$ac_hdr>
  2084. EOF
  2085. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2086. { (eval echo configure:2087: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2087. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2088. if test -z "$ac_err"; then
  2089.   rm -rf conftest*
  2090.   eval "ac_cv_header_$ac_safe=yes"
  2091. else
  2092.   echo "$ac_err" >&5
  2093.   echo "configure: failed program was:" >&5
  2094.   cat conftest.$ac_ext >&5
  2095.   rm -rf conftest*
  2096.   eval "ac_cv_header_$ac_safe=no"
  2097. fi
  2098. rm -f conftest*
  2099. fi
  2100. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2101.   echo "$ac_t""yes" 1>&6
  2102.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2103.   cat >> confdefs.h <<EOF
  2104. #define $ac_tr_hdr 1
  2105. EOF
  2106.  
  2107. else
  2108.   echo "$ac_t""no" 1>&6
  2109. fi
  2110. done
  2111.  
  2112.  
  2113. echo $ac_n "checking for working const""... $ac_c" 1>&6
  2114. echo "configure:2115: checking for working const" >&5
  2115. if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  2116.   echo $ac_n "(cached) $ac_c" 1>&6
  2117. else
  2118.   cat > conftest.$ac_ext <<EOF
  2119. #line 2120 "configure"
  2120. #include "confdefs.h"
  2121.  
  2122. int main() {
  2123.  
  2124. /* Ultrix mips cc rejects this.  */
  2125. typedef int charset[2]; const charset x;
  2126. /* SunOS 4.1.1 cc rejects this.  */
  2127. char const *const *ccp;
  2128. char **p;
  2129. /* NEC SVR4.0.2 mips cc rejects this.  */
  2130. struct point {int x, y;};
  2131. static struct point const zero = {0,0};
  2132. /* AIX XL C 1.02.0.0 rejects this.
  2133.    It does not let you subtract one const X* pointer from another in an arm
  2134.    of an if-expression whose if-part is not a constant expression */
  2135. const char *g = "string";
  2136. ccp = &g + (g ? g-g : 0);
  2137. /* HPUX 7.0 cc rejects these. */
  2138. ++ccp;
  2139. p = (char**) ccp;
  2140. ccp = (char const *const *) p;
  2141. { /* SCO 3.2v4 cc rejects this.  */
  2142.   char *t;
  2143.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  2144.  
  2145.   *t++ = 0;
  2146. }
  2147. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  2148.   int x[] = {25, 17};
  2149.   const int *foo = &x[0];
  2150.   ++foo;
  2151. }
  2152. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  2153.   typedef const int *iptr;
  2154.   iptr p = 0;
  2155.   ++p;
  2156. }
  2157. { /* AIX XL C 1.02.0.0 rejects this saying
  2158.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  2159.   struct s { int j; const int *ap[3]; };
  2160.   struct s *b; b->j = 5;
  2161. }
  2162. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  2163.   const int foo = 10;
  2164. }
  2165.  
  2166. ; return 0; }
  2167. EOF
  2168. if { (eval echo configure:2169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2169.   rm -rf conftest*
  2170.   ac_cv_c_const=yes
  2171. else
  2172.   echo "configure: failed program was:" >&5
  2173.   cat conftest.$ac_ext >&5
  2174.   rm -rf conftest*
  2175.   ac_cv_c_const=no
  2176. fi
  2177. rm -f conftest*
  2178. fi
  2179.  
  2180. echo "$ac_t""$ac_cv_c_const" 1>&6
  2181. if test $ac_cv_c_const = no; then
  2182.   cat >> confdefs.h <<\EOF
  2183. #define const 
  2184. EOF
  2185.  
  2186. fi
  2187.  
  2188.  
  2189. for ac_func in strdup
  2190. do
  2191. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2192. echo "configure:2193: checking for $ac_func" >&5
  2193. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2194.   echo $ac_n "(cached) $ac_c" 1>&6
  2195. else
  2196.   cat > conftest.$ac_ext <<EOF
  2197. #line 2198 "configure"
  2198. #include "confdefs.h"
  2199. /* System header to define __stub macros and hopefully few prototypes,
  2200.     which can conflict with char $ac_func(); below.  */
  2201. #include <assert.h>
  2202. /* Override any gcc2 internal prototype to avoid an error.  */
  2203. /* We use char because int might match the return type of a gcc2
  2204.     builtin and then its argument prototype would still apply.  */
  2205. char $ac_func();
  2206.  
  2207. int main() {
  2208.  
  2209. /* The GNU C library defines this for functions which it implements
  2210.     to always fail with ENOSYS.  Some functions are actually named
  2211.     something starting with __ and the normal name is an alias.  */
  2212. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2213. choke me
  2214. #else
  2215. $ac_func();
  2216. #endif
  2217.  
  2218. ; return 0; }
  2219. EOF
  2220. if { (eval echo configure:2221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2221.   rm -rf conftest*
  2222.   eval "ac_cv_func_$ac_func=yes"
  2223. else
  2224.   echo "configure: failed program was:" >&5
  2225.   cat conftest.$ac_ext >&5
  2226.   rm -rf conftest*
  2227.   eval "ac_cv_func_$ac_func=no"
  2228. fi
  2229. rm -f conftest*
  2230. fi
  2231.  
  2232. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2233.   echo "$ac_t""yes" 1>&6
  2234.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2235.   cat >> confdefs.h <<EOF
  2236. #define $ac_tr_func 1
  2237. EOF
  2238.  
  2239. else
  2240.   echo "$ac_t""no" 1>&6
  2241. LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
  2242. fi
  2243. done
  2244.  
  2245.  
  2246.  
  2247. for ac_func in getopt_long 
  2248. do
  2249. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2250. echo "configure:2251: checking for $ac_func" >&5
  2251. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2252.   echo $ac_n "(cached) $ac_c" 1>&6
  2253. else
  2254.   cat > conftest.$ac_ext <<EOF
  2255. #line 2256 "configure"
  2256. #include "confdefs.h"
  2257. /* System header to define __stub macros and hopefully few prototypes,
  2258.     which can conflict with char $ac_func(); below.  */
  2259. #include <assert.h>
  2260. /* Override any gcc2 internal prototype to avoid an error.  */
  2261. /* We use char because int might match the return type of a gcc2
  2262.     builtin and then its argument prototype would still apply.  */
  2263. char $ac_func();
  2264.  
  2265. int main() {
  2266.  
  2267. /* The GNU C library defines this for functions which it implements
  2268.     to always fail with ENOSYS.  Some functions are actually named
  2269.     something starting with __ and the normal name is an alias.  */
  2270. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2271. choke me
  2272. #else
  2273. $ac_func();
  2274. #endif
  2275.  
  2276. ; return 0; }
  2277. EOF
  2278. if { (eval echo configure:2279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2279.   rm -rf conftest*
  2280.   eval "ac_cv_func_$ac_func=yes"
  2281. else
  2282.   echo "configure: failed program was:" >&5
  2283.   cat conftest.$ac_ext >&5
  2284.   rm -rf conftest*
  2285.   eval "ac_cv_func_$ac_func=no"
  2286. fi
  2287. rm -f conftest*
  2288. fi
  2289.  
  2290. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2291.   echo "$ac_t""yes" 1>&6
  2292.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2293.   cat >> confdefs.h <<EOF
  2294. #define $ac_tr_func 1
  2295. EOF
  2296.  
  2297. else
  2298.   echo "$ac_t""no" 1>&6
  2299. LIBOBJS="$LIBOBJS getopt.o getopt1.o" 
  2300. fi
  2301. done
  2302.  
  2303.  
  2304. for ac_prog in tar gtar
  2305. do
  2306. # Extract the first word of "$ac_prog", so it can be a program name with args.
  2307. set dummy $ac_prog; ac_word=$2
  2308. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2309. echo "configure:2310: checking for $ac_word" >&5
  2310. if eval "test \"`echo '$''{'ac_cv_path_TAR'+set}'`\" = set"; then
  2311.   echo $ac_n "(cached) $ac_c" 1>&6
  2312. else
  2313.   case "$TAR" in
  2314.   /*)
  2315.   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
  2316.   ;;
  2317.   ?:/*)             
  2318.   ac_cv_path_TAR="$TAR" # Let the user override the test with a dos path.
  2319.   ;;
  2320.   *)
  2321.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  2322.   ac_dummy="$PATH"
  2323.   for ac_dir in $ac_dummy; do 
  2324.     test -z "$ac_dir" && ac_dir=.
  2325.     if test -f $ac_dir/$ac_word; then
  2326.       ac_cv_path_TAR="$ac_dir/$ac_word"
  2327.       break
  2328.     fi
  2329.   done
  2330.   IFS="$ac_save_ifs"
  2331.   ;;
  2332. esac
  2333. fi
  2334. TAR="$ac_cv_path_TAR"
  2335. if test -n "$TAR"; then
  2336.   echo "$ac_t""$TAR" 1>&6
  2337. else
  2338.   echo "$ac_t""no" 1>&6
  2339. fi
  2340.  
  2341. test -n "$TAR" && break
  2342. done
  2343.  
  2344.  
  2345. for ac_prog in cpp2html
  2346. do
  2347. # Extract the first word of "$ac_prog", so it can be a program name with args.
  2348. set dummy $ac_prog; ac_word=$2
  2349. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2350. echo "configure:2351: checking for $ac_word" >&5
  2351. if eval "test \"`echo '$''{'ac_cv_path_CPP2HTML'+set}'`\" = set"; then
  2352.   echo $ac_n "(cached) $ac_c" 1>&6
  2353. else
  2354.   case "$CPP2HTML" in
  2355.   /*)
  2356.   ac_cv_path_CPP2HTML="$CPP2HTML" # Let the user override the test with a path.
  2357.   ;;
  2358.   ?:/*)             
  2359.   ac_cv_path_CPP2HTML="$CPP2HTML" # Let the user override the test with a dos path.
  2360.   ;;
  2361.   *)
  2362.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  2363.   ac_dummy="$PATH"
  2364.   for ac_dir in $ac_dummy; do 
  2365.     test -z "$ac_dir" && ac_dir=.
  2366.     if test -f $ac_dir/$ac_word; then
  2367.       ac_cv_path_CPP2HTML="$ac_dir/$ac_word"
  2368.       break
  2369.     fi
  2370.   done
  2371.   IFS="$ac_save_ifs"
  2372.   ;;
  2373. esac
  2374. fi
  2375. CPP2HTML="$ac_cv_path_CPP2HTML"
  2376. if test -n "$CPP2HTML"; then
  2377.   echo "$ac_t""$CPP2HTML" 1>&6
  2378. else
  2379.   echo "$ac_t""no" 1>&6
  2380. fi
  2381.  
  2382. test -n "$CPP2HTML" && break
  2383. done
  2384.  
  2385.  
  2386.  
  2387.  
  2388. if test "$ac_cv_func_getopt_long" = no  ; then
  2389.   NO_GETOPTLONG_TRUE=
  2390.   NO_GETOPTLONG_FALSE='#'
  2391. else
  2392.   NO_GETOPTLONG_TRUE='#'
  2393.   NO_GETOPTLONG_FALSE=
  2394. fi
  2395.  
  2396.  
  2397. if test "$ac_cv_func_strdup" = no ; then
  2398.   NO_STRDUP_TRUE=
  2399.   NO_STRDUP_FALSE='#'
  2400. else
  2401.   NO_STRDUP_TRUE='#'
  2402.   NO_STRDUP_FALSE=
  2403. fi
  2404.  
  2405.  
  2406. if test -z "$ac_cv_path_CPP2HTML" ; then
  2407.   NO_CPP2HTML_TRUE=
  2408.   NO_CPP2HTML_FALSE='#'
  2409. else
  2410.   NO_CPP2HTML_TRUE='#'
  2411.   NO_CPP2HTML_FALSE=
  2412. fi
  2413.  
  2414. trap '' 1 2 15
  2415. cat > confcache <<\EOF
  2416. # This file is a shell script that caches the results of configure
  2417. # tests run on this system so they can be shared between configure
  2418. # scripts and configure runs.  It is not useful on other systems.
  2419. # If it contains results you don't want to keep, you may remove or edit it.
  2420. #
  2421. # By default, configure uses ./config.cache as the cache file,
  2422. # creating it if it does not exist already.  You can give configure
  2423. # the --cache-file=FILE option to use a different cache file; that is
  2424. # what configure does when it calls configure scripts in
  2425. # subdirectories, so they share the cache.
  2426. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  2427. # config.status only pays attention to the cache file if you give it the
  2428. # --recheck option to rerun configure.
  2429. #
  2430. EOF
  2431. # The following way of writing the cache mishandles newlines in values,
  2432. # but we know of no workaround that is simple, portable, and efficient.
  2433. # So, don't put newlines in cache variables' values.
  2434. # Ultrix sh set writes to stderr and can't be redirected directly,
  2435. # and sets the high bit in the cache file unless we assign to the vars.
  2436. (set) 2>&1 |
  2437.   case `(ac_space=' '; set | grep ac_space) 2>&1` in
  2438.   *ac_space=\ *)
  2439.     # `set' does not quote correctly, so add quotes (double-quote substitution
  2440.     # turns \\\\ into \\, and sed turns \\ into \).
  2441.     sed -n \
  2442.       -e "s/'/'\\\\''/g" \
  2443.       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
  2444.     ;;
  2445.   *)
  2446.     # `set' quotes correctly as required by POSIX, so do not add quotes.
  2447.     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
  2448.     ;;
  2449.   esac >> confcache
  2450. if cmp -s $cache_file confcache; then
  2451.   :
  2452. else
  2453.   if test -w $cache_file; then
  2454.     echo "updating cache $cache_file"
  2455.     cat confcache > $cache_file
  2456.   else
  2457.     echo "not updating unwritable cache $cache_file"
  2458.   fi
  2459. fi
  2460. rm -f confcache
  2461.  
  2462. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  2463.  
  2464. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  2465. # Let make expand exec_prefix.
  2466. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  2467.  
  2468. # Any assignment to VPATH causes Sun make to only execute
  2469. # the first set of double-colon rules, so remove it if not needed.
  2470. # If there is a colon in the path, we need to keep it.
  2471. if test "x$srcdir" = x.; then
  2472.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  2473. fi
  2474.  
  2475. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  2476.  
  2477. DEFS=-DHAVE_CONFIG_H
  2478.  
  2479. # Without the "./", some shells look in PATH for config.status.
  2480. : ${CONFIG_STATUS=./config.status}
  2481.  
  2482. echo creating $CONFIG_STATUS
  2483. rm -f $CONFIG_STATUS
  2484. cat > $CONFIG_STATUS <<EOF
  2485. #! /bin/sh
  2486. # Generated automatically by configure.
  2487. # Run this file to recreate the current configuration.
  2488. # This directory was configured as follows,
  2489. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  2490. #
  2491. # $0 $ac_configure_args
  2492. #
  2493. # Compiler output produced by configure, useful for debugging
  2494. # configure, is in ./config.log if it exists.
  2495.  
  2496. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  2497. for ac_option
  2498. do
  2499.   case "\$ac_option" in
  2500.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  2501.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  2502.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  2503.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  2504.     echo "$CONFIG_STATUS generated by autoconf version 2.13"
  2505.     exit 0 ;;
  2506.   -help | --help | --hel | --he | --h)
  2507.     echo "\$ac_cs_usage"; exit 0 ;;
  2508.   *) echo "\$ac_cs_usage"; exit 1 ;;
  2509.   esac
  2510. done
  2511.  
  2512. ac_given_srcdir=$srcdir
  2513. ac_given_INSTALL="$INSTALL"
  2514.  
  2515. trap 'rm -fr `echo "Makefile txtc.sh src/Makefile doc/Makefile doc/gengetopt.1 
  2516.            doc/gengetopt.html tests/Makefile tests/no_optgiven.sh
  2517.            tests/more_than_once.sh config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  2518. EOF
  2519. cat >> $CONFIG_STATUS <<EOF
  2520.  
  2521. # Protect against being on the right side of a sed subst in config.status.
  2522. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  2523.  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  2524. $ac_vpsub
  2525. $extrasub
  2526. s%@SHELL@%$SHELL%g
  2527. s%@CFLAGS@%$CFLAGS%g
  2528. s%@CPPFLAGS@%$CPPFLAGS%g
  2529. s%@CXXFLAGS@%$CXXFLAGS%g
  2530. s%@FFLAGS@%$FFLAGS%g
  2531. s%@DEFS@%$DEFS%g
  2532. s%@LDFLAGS@%$LDFLAGS%g
  2533. s%@LIBS@%$LIBS%g
  2534. s%@exec_prefix@%$exec_prefix%g
  2535. s%@prefix@%$prefix%g
  2536. s%@program_transform_name@%$program_transform_name%g
  2537. s%@bindir@%$bindir%g
  2538. s%@sbindir@%$sbindir%g
  2539. s%@libexecdir@%$libexecdir%g
  2540. s%@datadir@%$datadir%g
  2541. s%@sysconfdir@%$sysconfdir%g
  2542. s%@sharedstatedir@%$sharedstatedir%g
  2543. s%@localstatedir@%$localstatedir%g
  2544. s%@libdir@%$libdir%g
  2545. s%@includedir@%$includedir%g
  2546. s%@oldincludedir@%$oldincludedir%g
  2547. s%@infodir@%$infodir%g
  2548. s%@mandir@%$mandir%g
  2549. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  2550. s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
  2551. s%@INSTALL_DATA@%$INSTALL_DATA%g
  2552. s%@PACKAGE@%$PACKAGE%g
  2553. s%@VERSION@%$VERSION%g
  2554. s%@ACLOCAL@%$ACLOCAL%g
  2555. s%@AUTOCONF@%$AUTOCONF%g
  2556. s%@AUTOMAKE@%$AUTOMAKE%g
  2557. s%@AUTOHEADER@%$AUTOHEADER%g
  2558. s%@MAKEINFO@%$MAKEINFO%g
  2559. s%@SET_MAKE@%$SET_MAKE%g
  2560. s%@gengetoptdocdir@%$gengetoptdocdir%g
  2561. s%@gengetoptexamplesdir@%$gengetoptexamplesdir%g
  2562. s%@CC@%$CC%g
  2563. s%@CPP@%$CPP%g
  2564. s%@CXX@%$CXX%g
  2565. s%@EXEEXT@%$EXEEXT%g
  2566. s%@AWK@%$AWK%g
  2567. s%@TXTC@%$TXTC%g
  2568. s%@YACC@%$YACC%g
  2569. s%@YFLAGS@%$YFLAGS%g
  2570. s%@LEX@%$LEX%g
  2571. s%@LEXLIB@%$LEXLIB%g
  2572. s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
  2573. s%@LIBOBJS@%$LIBOBJS%g
  2574. s%@TAR@%$TAR%g
  2575. s%@CPP2HTML@%$CPP2HTML%g
  2576. s%@NO_GETOPTLONG_TRUE@%$NO_GETOPTLONG_TRUE%g
  2577. s%@NO_GETOPTLONG_FALSE@%$NO_GETOPTLONG_FALSE%g
  2578. s%@NO_STRDUP_TRUE@%$NO_STRDUP_TRUE%g
  2579. s%@NO_STRDUP_FALSE@%$NO_STRDUP_FALSE%g
  2580. s%@NO_CPP2HTML_TRUE@%$NO_CPP2HTML_TRUE%g
  2581. s%@NO_CPP2HTML_FALSE@%$NO_CPP2HTML_FALSE%g
  2582.  
  2583. CEOF
  2584. EOF
  2585.  
  2586. cat >> $CONFIG_STATUS <<\EOF
  2587.  
  2588. # Split the substitutions into bite-sized pieces for seds with
  2589. # small command number limits, like on Digital OSF/1 and HP-UX.
  2590. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  2591. ac_file=1 # Number of current file.
  2592. ac_beg=1 # First line for current file.
  2593. ac_end=$ac_max_sed_cmds # Line after last line for current file.
  2594. ac_more_lines=:
  2595. ac_sed_cmds=""
  2596. while $ac_more_lines; do
  2597.   if test $ac_beg -gt 1; then
  2598.     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  2599.   else
  2600.     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  2601.   fi
  2602.   if test ! -s conftest.s$ac_file; then
  2603.     ac_more_lines=false
  2604.     rm -f conftest.s$ac_file
  2605.   else
  2606.     if test -z "$ac_sed_cmds"; then
  2607.       ac_sed_cmds="sed -f conftest.s$ac_file"
  2608.     else
  2609.       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  2610.     fi
  2611.     ac_file=`expr $ac_file + 1`
  2612.     ac_beg=$ac_end
  2613.     ac_end=`expr $ac_end + $ac_max_sed_cmds`
  2614.   fi
  2615. done
  2616. if test -z "$ac_sed_cmds"; then
  2617.   ac_sed_cmds=cat
  2618. fi
  2619. EOF
  2620.  
  2621. cat >> $CONFIG_STATUS <<EOF
  2622.  
  2623. CONFIG_FILES=\${CONFIG_FILES-"Makefile txtc.sh src/Makefile doc/Makefile doc/gengetopt.1 
  2624.            doc/gengetopt.html tests/Makefile tests/no_optgiven.sh
  2625.            tests/more_than_once.sh"}
  2626. EOF
  2627. cat >> $CONFIG_STATUS <<\EOF
  2628. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  2629.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  2630.   case "$ac_file" in
  2631.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  2632.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  2633.   *) ac_file_in="${ac_file}.in" ;;
  2634.   esac
  2635.  
  2636.   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  2637.  
  2638.   # Remove last slash and all that follows it.  Not all systems have dirname.
  2639.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  2640.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  2641.     # The file is in a subdirectory.
  2642.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  2643.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  2644.     # A "../" for each directory in $ac_dir_suffix.
  2645.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  2646.   else
  2647.     ac_dir_suffix= ac_dots=
  2648.   fi
  2649.  
  2650.   case "$ac_given_srcdir" in
  2651.   .)  srcdir=.
  2652.       if test -z "$ac_dots"; then top_srcdir=.
  2653.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  2654.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  2655.   *) # Relative path.
  2656.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  2657.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  2658.   esac
  2659.  
  2660.   case "$ac_given_INSTALL" in
  2661.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  2662.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  2663.   esac
  2664.  
  2665.   echo creating "$ac_file"
  2666.   rm -f "$ac_file"
  2667.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  2668.   case "$ac_file" in
  2669.   *Makefile*) ac_comsub="1i\\
  2670. # $configure_input" ;;
  2671.   *) ac_comsub= ;;
  2672.   esac
  2673.  
  2674.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  2675.   sed -e "$ac_comsub
  2676. s%@configure_input@%$configure_input%g
  2677. s%@srcdir@%$srcdir%g
  2678. s%@top_srcdir@%$top_srcdir%g
  2679. s%@INSTALL@%$INSTALL%g
  2680. " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  2681. fi; done
  2682. rm -f conftest.s*
  2683.  
  2684. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  2685. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  2686. #
  2687. # ac_d sets the value in "#define NAME VALUE" lines.
  2688. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  2689. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  2690. ac_dC='\3'
  2691. ac_dD='%g'
  2692. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  2693. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2694. ac_uB='\([     ]\)%\1#\2define\3'
  2695. ac_uC=' '
  2696. ac_uD='\4%g'
  2697. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  2698. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2699. ac_eB='$%\1#\2define\3'
  2700. ac_eC=' '
  2701. ac_eD='%g'
  2702.  
  2703. if test "${CONFIG_HEADERS+set}" != set; then
  2704. EOF
  2705. cat >> $CONFIG_STATUS <<EOF
  2706.   CONFIG_HEADERS="config.h"
  2707. EOF
  2708. cat >> $CONFIG_STATUS <<\EOF
  2709. fi
  2710. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  2711.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  2712.   case "$ac_file" in
  2713.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  2714.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  2715.   *) ac_file_in="${ac_file}.in" ;;
  2716.   esac
  2717.  
  2718.   echo creating $ac_file
  2719.  
  2720.   rm -f conftest.frag conftest.in conftest.out
  2721.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  2722.   cat $ac_file_inputs > conftest.in
  2723.  
  2724. EOF
  2725.  
  2726. # Transform confdefs.h into a sed script conftest.vals that substitutes
  2727. # the proper values into config.h.in to produce config.h.  And first:
  2728. # Protect against being on the right side of a sed subst in config.status.
  2729. # Protect against being in an unquoted here document in config.status.
  2730. rm -f conftest.vals
  2731. cat > conftest.hdr <<\EOF
  2732. s/[\\&%]/\\&/g
  2733. s%[\\$`]%\\&%g
  2734. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  2735. s%ac_d%ac_u%gp
  2736. s%ac_u%ac_e%gp
  2737. EOF
  2738. sed -n -f conftest.hdr confdefs.h > conftest.vals
  2739. rm -f conftest.hdr
  2740.  
  2741. # This sed command replaces #undef with comments.  This is necessary, for
  2742. # example, in the case of _POSIX_SOURCE, which is predefined and required
  2743. # on some systems where configure will not decide to define it.
  2744. cat >> conftest.vals <<\EOF
  2745. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  2746. EOF
  2747.  
  2748. # Break up conftest.vals because some shells have a limit on
  2749. # the size of here documents, and old seds have small limits too.
  2750.  
  2751. rm -f conftest.tail
  2752. while :
  2753. do
  2754.   ac_lines=`grep -c . conftest.vals`
  2755.   # grep -c gives empty output for an empty file on some AIX systems.
  2756.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  2757.   # Write a limited-size here document to conftest.frag.
  2758.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  2759.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  2760.   echo 'CEOF
  2761.   sed -f conftest.frag conftest.in > conftest.out
  2762.   rm -f conftest.in
  2763.   mv conftest.out conftest.in
  2764. ' >> $CONFIG_STATUS
  2765.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  2766.   rm -f conftest.vals
  2767.   mv conftest.tail conftest.vals
  2768. done
  2769. rm -f conftest.vals
  2770.  
  2771. cat >> $CONFIG_STATUS <<\EOF
  2772.   rm -f conftest.frag conftest.h
  2773.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  2774.   cat conftest.in >> conftest.h
  2775.   rm -f conftest.in
  2776.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  2777.     echo "$ac_file is unchanged"
  2778.     rm -f conftest.h
  2779.   else
  2780.     # Remove last slash and all that follows it.  Not all systems have dirname.
  2781.       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  2782.       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  2783.       # The file is in a subdirectory.
  2784.       test ! -d "$ac_dir" && mkdir "$ac_dir"
  2785.     fi
  2786.     rm -f $ac_file
  2787.     mv conftest.h $ac_file
  2788.   fi
  2789. fi; done
  2790.  
  2791. EOF
  2792. cat >> $CONFIG_STATUS <<EOF
  2793.  
  2794.  
  2795. EOF
  2796. cat >> $CONFIG_STATUS <<\EOF
  2797. test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
  2798. chmod +x tests/no_optgiven.sh
  2799.            chmod +x tests/more_than_once.sh
  2800. exit 0
  2801. EOF
  2802. chmod +x $CONFIG_STATUS
  2803. rm -fr confdefs* $ac_clean_files
  2804. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  2805.  
  2806.